<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>{block name="title"}后台管理{/block}</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="author" content="Bluth Company">
  <link rel="shortcut icon" href="__STATIC__/assets/ico/favicon.html">
  <link href="__STATIC__/assets/css/bootstrap.css" rel="stylesheet">
  <link href="__STATIC__/assets/css/theme.css" rel="stylesheet">
  <link href="__STATIC__/assets/css/font-awesome.min.css" rel="stylesheet">
  <link href="__STATIC__/assets/css/alertify.css" rel="stylesheet">

  <link rel="Favicon Icon" href="favicon.ico">
  <style type="text/css">
    .line-limit-length {
      width: 300px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  </style>
  <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
  <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>

<body>
  <div id="wrap">
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <div class="logo">
            <img src="__STATIC__/assets/img/logo.png" alt="Realm Admin Template">
          </div>
          <a class="btn btn-navbar visible-phone" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="btn btn-navbar slide_menu_left visible-tablet">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>

          <div class="top-menu visible-desktop">
            <ul class="pull-left">
              <!-- <li><a id="messages" data-notification="2" href="#"><i class="icon-envelope"></i> Messages</a></li> -->
              <!-- <li><a id="notifications" data-notification="3" href="#"><i class="icon-globe"></i> Notifications</a></li> -->
            </ul>
            <ul class="pull-right">
              <li><a href="{:url('index/logout')}"><i class="icon-off"></i> Logout</a></li>
            </ul>
          </div>

          <div class="top-menu visible-phone visible-tablet">
            <ul class="pull-right">
              <li><a title="link to View all Messages page, no popover in phone view or tablet" href="#"><i
                    class="icon-envelope"></i></a></li>
              <li><a title="link to View all Notifications page, no popover in phone view or tablet" href="#"><i
                    class="icon-globe"></i></a></li>
              <li><a href="login.html"><i class="icon-off"></i></a></li>
            </ul>
          </div>

        </div>
      </div>
    </div>

    <div class="container-fluid">
      {block name="sidemenu"}
      {include file="public:sidemenu"/}
      {/block}
      <!-- Main window -->
      <div class="main_container" id="users_page">

        <div class="row-fluid">
          <ul class="breadcrumb">
            <!-- <li><a href="#">Home</a> <span class="divider">/</span></li>
            <li><a href="#">Pages</a> <span class="divider">/</span></li>
            <li class="active">Admin</li> -->
          </ul>
          <h2 class="heading">
              Admin: {$Think.session.admin}
            <div class="btn-group pull-right">
              <button class="btn"><i class="icon-download-alt"></i> Export</button>
              <button class="btn"><i class="icon-envelope"></i> Email</button>
              <button class="btn"><i class="icon-cog"></i> Settings</button>
            </div>
          </h2>
        </div> 
<!-- /row-fluid -->

        <div class="row-fluid">
          <div class="widget widget-padding span12">
            <div class="widget-header">
              <i class="icon-group"></i>
              <h5>admin</h5>
              <div class="widget-buttons">
                <a href="add.html" data-title="Add User" data-toggle="modal" data-target="#example_modal"><a
                    href="add.html"><i class="icon-plus"></i></a></a>
                <a href="#" data-title="Collapse" data-collapsed="false" class="collapse"><i
                    class="icon-chevron-up"></i></a>
              </div>
            </div>
            {block name="main"}基础页面{/block}
          </div> <!-- /widget -->
        </div> <!-- /row-fluid -->

      </div>
      <!-- /Main window -->

    </div>
    <!--/.fluid-container-->
  </div><!-- wrap ends-->

  <!-- Example Modal -->
  <div id="example_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
    aria-hidden="true">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">添加用户</h3>
    </div>
    <div class="modal-body">
    </div>
    <div class="modal-footer">
      <button class="btn" data-dismiss="modal" aria-hidden="true">重置</button>
      <button class="btn btn-primary">添加</button>
    </div>
  </div>

  <script src="__STATIC__/assets/js/jquery.min.js"></script>
  <script src="__STATIC__/assets/js/jquery-ui.min.js"></script>
  <script src="__STATIC__/assets/js/raphael-min.js"></script>
  <script src="__STATIC__/assets/js/bootstrap.js"></script>
  <script src='__STATIC__/assets/js/sparkline.js'></script>
  <script src='__STATIC__/assets/js/morris.min.js'></script>
  <script src="__STATIC__/assets/js/jquery.dataTables.min.js"></script>
  <script src="__STATIC__/assets/js/jquery.masonry.min.js"></script>
  <script src="__STATIC__/assets/js/jquery.imagesloaded.min.js"></script>
  <script src="__STATIC__/assets/js/jquery.facybox.js"></script>
  <script src="__STATIC__/assets/js/jquery.alertify.min.js"></script>
  <script src="__STATIC__/assets/js/jquery.knob.js"></script>
  <script src='__STATIC__/assets/js/fullcalendar.min.js'></script>
  <script src='__STATIC__/assets/js/jquery.gritter.min.js'></script>
  <script src="__STATIC__/assets/js/realm.js"></script>
</body>
<script>
  $(".slabel").on("click", function () {
    $(this).toggleClass("label-success");
    if ($(this).attr("data-status") == 1) {
      $(this).text("正常");
      $(this).attr("data-status", 0);
      $.ajax({
        type: 'post',
        url: "{:url('User/status')}",
        data: {
          "status": 0,
          "uid": $(this).attr("data-uid"),
        },
        //				dataType:"json",
        success: function (data) {
          console.log(data);
          if (data != "success")
            alert(data);
        },
        error: function (error) {
          alert(error);
        }
      });
    } else {
      $(this).text("禁用");
      $(this).attr("data-status", 1);
      $.ajax({
        type: 'post',
        url: "{:url('User/status')}",
        data: {
          "status": 1,
          "uid": $(this).attr("data-uid"),
        },
        //				dataType:"json",
        success: function (data) {
          console.log(data);
          if (data != "success")
            alert(data);
        },
        error: function (error) {
          alert("error");
        }
      });
      // $vo.status == 0;
    }
    console.log($(this).val());
  })
</script>


</html>
